//
//  DLNAPlayManager.h
//  ttkan
//
//  Created by jackcheng on 2017/10/12.
//  Copyright © 2017年 xiangyue. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "DLNAUpnpServer.h"





extern  NSNotificationName const DLNAStartPlayNotification;
extern  NSNotificationName const DLNAStopPlayNotification;

typedef NS_ENUM(NSInteger,DLNAActionType) {
	DLNAActionTypePlay,
	DLNAActionTypePause,
	DLNAActionTypeStop,
};

typedef NS_ENUM(NSInteger,DLNAPlayBack) {
	DLNAPlayBackNone = -1,
	DLNAPlayBackSucess = 0,
	DLNAPlayBackFailed,
};

@class ShowPlaySourceInfoModel;

@interface DLNAPlayManager : NSObject

+ (DLNAPlayManager *)manager;

@property (nonatomic,strong) NSMutableArray *deviceList;
@property (nonatomic,copy) NSString *serviceId;
@property (nonatomic,assign) BOOL isSearching;
@property (nonatomic,assign) BOOL isPlayingOnTV;
@property (nonatomic,assign) BOOL isPlaying;
@property (nonatomic,assign) DLNAPlayBack playBack;
@property (nonatomic,assign) DLNAActionType actionType;
@property (nonatomic,copy) NSString *title;
@property (nonatomic,assign) NSInteger startTime;
@property (nonatomic,strong) ShowPlaySourceInfoModel *curentModel;
@property (nonatomic,assign) NSInteger mid;
@property (nonatomic,assign) BOOL isOnTV;
@property (nonatomic,strong) UIButton *dlnaBtn;


- (void)search;
- (void)playUrl:(NSString *)url title:(NSString *)title startTime:(NSTimeInterval)time;
- (void)playWithdevice:(Device *)device comeplete:(void(^)(BOOL))comepleteBlock;
- (void)play;
- (void)pause;
- (void)stop;
- (void)seekTo:(NSInteger)time;
- (float)currentTime;
- (float)durationTime;
- (BOOL)isOnTVWithMid:(NSInteger)mid;

@end
